package pl.maciejziarko.mshare.service;

import pl.maciejziarko.mshare.domain.Account;
import pl.maciejziarko.mshare.service.exception.AccountNotFoundException;
import pl.maciejziarko.mshare.service.exception.AccountServiceException;
import pl.maciejziarko.mshare.service.exception.EmailUsedException;
import pl.maciejziarko.mshare.service.exception.UsernameTakenException;

import java.util.List;

/**
 * @author Maciej Ziarko
 */
public interface AccountService {

    void addAccount(Account account) throws UsernameTakenException, EmailUsedException, AccountServiceException;

    void removeAccount(String username) throws AccountNotFoundException, AccountServiceException;

    void editAccount(Account account) throws EmailUsedException, AccountServiceException;

    Account getAccount(String username) throws AccountNotFoundException, AccountServiceException;

    List<Account> getAllAccounts() throws AccountServiceException;

    void removeAllAccounts() throws AccountServiceException;

    Account getCredentials(String username) throws AccountNotFoundException, AccountServiceException;

    long countAccounts() throws AccountServiceException;

}
